package com.wcar.sale.feign;

import com.wcar.common.entity.Menu;
import com.wcar.common.entity.User;
import com.wcar.common.vo.Result;

import com.wcar.sale.feign.factory.UserFeignFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@FeignClient(value = "wcar-system",fallbackFactory = UserFeignFactory.class)
public interface UserFeign {

    @GetMapping("/queryTreeDateByUserId")
    public Result<List<Menu>> queryTreeByUserId();

    @PostMapping("/api/addMenu")
    public Result addMenu(@RequestBody Menu menu);

    @DeleteMapping("api/deleteMenu/{menuId}")
    public Result deleteMenu(@PathVariable Integer menuId);
}
